[XEN] Implement proper __read_mostly memory arrangemengt for x86.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 8 Aug 2006 14:14:43 +0000 (15:14 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 8 Aug 2006 14:14:43 +0000 (15:14 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/x86_32/xen.lds.S
xen/arch/x86/x86_64/xen.lds.S
xen/include/asm-ia64/linux-xen/asm/cache.h
xen/include/asm-powerpc/cache.h
xen/include/asm-x86/cache.h
xen/include/xen/config.h

index f58bd191f574d445e1dffa2607f2353fb45d68ff..a44bf8701b16c0f6be70e45e1f715a2eefe4329a 100644 (file)
@@ -46,6 +46,9 @@ SECTIONS
        CONSTRUCTORS
        } :text
 
+  . = ALIGN(128);
+  .data.read_mostly : { *(.data.read_mostly) } :text
+
   . = ALIGN(4096);             /* Init code and data */
   __init_begin = .;
   .text.init : { *(.text.init) } :text
index 92d395d5f90e537a6337680fd8bc2da999a8771a..f2ab8f8aa5ce574a69c30a87c6f8ec7b32893bc2 100644 (file)
@@ -44,6 +44,9 @@ SECTIONS
        CONSTRUCTORS
        } :text
 
+  . = ALIGN(128);
+  .data.read_mostly : { *(.data.read_mostly) } :text
+
   . = ALIGN(4096);             /* Init code and data */
   __init_begin = .;
   .text.init : { *(.text.init) } :text
index 7d4cfd56824db4d5f5349b71ec1e13c4e388366d..0db88a704410879fd0baa2a8480667f0df801012 100644 (file)
@@ -32,4 +32,6 @@
 #endif
 #endif
 
+#define __read_mostly
+
 #endif /* _ASM_IA64_CACHE_H */
index 9151f84000af0fa1edda2dac4fec8543d6afdae7..db1315dcf1c163c1253c43f878a1eadf70e1d9ee 100644 (file)
@@ -57,4 +57,6 @@ static __inline__ void synchronize_caches(ulong start, size_t len)
     isync();
 }
 
+#define __read_mostly
+
 #endif
index 2539a6f24051431112749c220a66d59639870d59..f5667a14fa89e2e414bcb970046a449708f42bd0 100644 (file)
@@ -10,4 +10,6 @@
 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
 #endif
index e38cf9e3664fef3b9912788fe36c044accf28bdf..e3f94d5843bec5054bc01a0bfcaa6f8ece589c22 100644 (file)
@@ -50,6 +50,5 @@
 #endif /* !__ASSEMBLY__ */
 
 #define fastcall
-#define __read_mostly
 
 #endif /* __XEN_CONFIG_H__ */